package com.wingscode.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wingscode.common.validator.group.AddGroup;
import com.wingscode.common.validator.group.UpdateGroup;

import java.io.Serializable;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import lombok.Data;

/**
 * 字典value
 *
 * @author yan
 */
@Data
@TableName("dictionary_value")
public class DictionaryValueEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId
	private Integer Id;

	/**
	 * 名称
	 */
	@NotBlank(message="name不能为空", groups = {AddGroup.class, UpdateGroup.class})
	private String name;

	/**
	 * 排序
	 */
	private Integer sort;

	/**
	 * 状态 0禁用 1启用
	 */
	private Integer state;

	/**
	 * 字典key id
	 */
	private Integer pid;

	/**
	 * 描述
	 */
	private String content;

	@TableField(exist = false)
	private String type;
}
